﻿<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="Home.Web._Default" %>
<%@ Register Assembly="TreeListView" Namespace="Home.Controls" TagPrefix="Home" %>
<%@ Import Namespace="Home.Web" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>TreeListView Test Page</title>
</head>
<body>
<form id="form1" runat="server">
    <Home:TreeListView ID="TreeListView1" runat="server" EnableViewState="false">
    <HeaderTemplate>
    <table width="500" border="0" cellpadding="0" cellspacing="1" bgcolor="#999999">
    <tr height="30" bgcolor="#FFFFFF">
    <td>ID</td>
    <td width="120px">Text</td>
    <td width="80px">FirstName</td>
    <td width="80px">LastName</td>
    </tr>
    </HeaderTemplate>
    <ItemTemplate>
    <tr <%# Container.NodeTreeTr %> bgcolor="<%# GetBgColor(Container.Node.ID)%>">
        <td height="30" style="padding-left:10px;"><%# Container.NodeTreeImage%></td>
        <td><%# Container.NodeText%></td>
        <td><%# Container.GetNodeValue("FirstName")%></td>
        <td><%# ((Employee)((TreeListNode)Container.DataItem).DataSource).LastName%></td>
     </tr>
    </ItemTemplate>
    <FooterTemplate>
    </table>
    </FooterTemplate>
    </Home:TreeListView>

</form>
</body>
</html>
